package models;

import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.OneToMany;

import play.db.ebean.Model;

/*
 * Producer model class. One producer can have many products.
 * Needed for better filtration.
 * author: Axakalov Sunnatilla
 */

@Entity
public class Producer extends Model {
	@Id
	public Long id;
	
	public String name;
	
	public static Finder<Long, Producer> find = new Finder<Long, Producer>(Long.class, Producer.class);
	
	public static Producer create(String name)
	{
		Producer producer = new Producer();
		producer.name = name;
		return producer;
	}
}